package com.kaige.usercenter.common;

import com.kaige.usercenter.enums.ErrorCodeEnum;

public class BaseResponse< T> {
    private int code;
    private String message;
    private T data;
    public BaseResponse(int code, String message, T data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }
    public BaseResponse(int code, String message) {
        this(code, message, null);
    }
    public BaseResponse(ErrorCodeEnum errorCode) {
        this(errorCode.getCode(), errorCode.getMessage(), null);
    }

}
